package com.example.superoa.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the salary_accout database table.
 * 
 */
@Entity
@Table(name="salary_accout")
@NamedQuery(name="SalaryAccout.findAll", query="SELECT s FROM SalaryAccout s")
public class SalaryAccout implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="account_id")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer accountId;

	@Column(name="account_name")
	private String accountName;

	@Column(name="sa_base")
	private BigDecimal saBase;

	@Column(name="sa_dass")
	private String saDass;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="sa_date")
	private Date saDate;

	@Column(name="sa_remarks")
	private String saRemarks;

	//bi-directional many-to-one association to SalaryReport
	@ManyToOne
	@JoinColumn(name="rs_id")
	private SalaryReport salaryReport;

	//bi-directional many-to-one association to Staff
	@ManyToOne
	@JoinColumn(name="staff_id")
	private Staff staff;

	//bi-directional many-to-many association to SalaryItem
	@ManyToMany(mappedBy="salaryAccouts")
	private List<SalaryItem> salaryItems;

	//bi-directional many-to-one association to SalaryPay
	@OneToMany(mappedBy="salaryAccout")
	private List<SalaryPay> salaryPays;

	//bi-directional many-to-one association to SalarySub
	@OneToMany(mappedBy="salaryAccout")
	private List<SalarySub> salarySubs;

	//bi-directional many-to-one association to SalaryTz
	@OneToMany(mappedBy="salaryAccout")
	private List<SalaryTz> salaryTzs;

	//bi-directional many-to-one association to Staff
	@OneToMany(mappedBy="salaryAccout")
	private List<Staff> staffs;

	public SalaryAccout() {
	}

	public Integer getAccountId() {
		return this.accountId;
	}

	public void setAccountId(Integer accountId) {
		this.accountId = accountId;
	}

	public String getAccountName() {
		return this.accountName;
	}

	public void setAccountName(String accountName) {
		this.accountName = accountName;
	}

	public BigDecimal getSaBase() {
		return this.saBase;
	}

	public void setSaBase(BigDecimal saBase) {
		this.saBase = saBase;
	}

	public String getSaDass() {
		return this.saDass;
	}

	public void setSaDass(String saDass) {
		this.saDass = saDass;
	}

	public Date getSaDate() {
		return this.saDate;
	}

	public void setSaDate(Date saDate) {
		this.saDate = saDate;
	}

	public String getSaRemarks() {
		return this.saRemarks;
	}

	public void setSaRemarks(String saRemarks) {
		this.saRemarks = saRemarks;
	}

	public SalaryReport getSalaryReport() {
		return this.salaryReport;
	}

	public void setSalaryReport(SalaryReport salaryReport) {
		this.salaryReport = salaryReport;
	}

	public Staff getStaff() {
		return this.staff;
	}

	public void setStaff(Staff staff) {
		this.staff = staff;
	}

	public List<SalaryItem> getSalaryItems() {
		return this.salaryItems;
	}

	public void setSalaryItems(List<SalaryItem> salaryItems) {
		this.salaryItems = salaryItems;
	}

	public List<SalaryPay> getSalaryPays() {
		return this.salaryPays;
	}

	public void setSalaryPays(List<SalaryPay> salaryPays) {
		this.salaryPays = salaryPays;
	}

	public SalaryPay addSalaryPay(SalaryPay salaryPay) {
		getSalaryPays().add(salaryPay);
		salaryPay.setSalaryAccout(this);

		return salaryPay;
	}

	public SalaryPay removeSalaryPay(SalaryPay salaryPay) {
		getSalaryPays().remove(salaryPay);
		salaryPay.setSalaryAccout(null);

		return salaryPay;
	}

	public List<SalarySub> getSalarySubs() {
		return this.salarySubs;
	}

	public void setSalarySubs(List<SalarySub> salarySubs) {
		this.salarySubs = salarySubs;
	}

	public SalarySub addSalarySub(SalarySub salarySub) {
		getSalarySubs().add(salarySub);
		salarySub.setSalaryAccout(this);

		return salarySub;
	}

	public SalarySub removeSalarySub(SalarySub salarySub) {
		getSalarySubs().remove(salarySub);
		salarySub.setSalaryAccout(null);

		return salarySub;
	}

	public List<SalaryTz> getSalaryTzs() {
		return this.salaryTzs;
	}

	public void setSalaryTzs(List<SalaryTz> salaryTzs) {
		this.salaryTzs = salaryTzs;
	}

	public SalaryTz addSalaryTz(SalaryTz salaryTz) {
		getSalaryTzs().add(salaryTz);
		salaryTz.setSalaryAccout(this);

		return salaryTz;
	}

	public SalaryTz removeSalaryTz(SalaryTz salaryTz) {
		getSalaryTzs().remove(salaryTz);
		salaryTz.setSalaryAccout(null);

		return salaryTz;
	}

	public List<Staff> getStaffs() {
		return this.staffs;
	}

	public void setStaffs(List<Staff> staffs) {
		this.staffs = staffs;
	}

	public Staff addStaff(Staff staff) {
		getStaffs().add(staff);
		staff.setSalaryAccout(this);

		return staff;
	}

	public Staff removeStaff(Staff staff) {
		getStaffs().remove(staff);
		staff.setSalaryAccout(null);

		return staff;
	}

}